//
//  AsyncDownload.h
//  first app
//
//  Created by 林 小明 on 14-7-10.
//
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, DownloadStatus) {
    kDownloadStatusInit = 0,
    kDownloadStatusStart = 1,
    kDownloadStatusProcess = 2,
    kDownloadStatusFinish = 3,
    kDownloadStatusPause = 4,
    kDownloadStatusError = 5,
};

@interface AsyncDownload : NSObject
{
    int download_status;
    unsigned long long total_size;
    unsigned long long file_offset;
    NSString* dir_path;
    NSString* file_name;
    NSString* download_url;
    NSMutableDictionary *downloadInfo;
    NSURLConnection* connection;
}

- (id)initWithDownloadFile:(NSString *)filename Path:(NSString *)dirpath Url:(NSString *)url;

- (void)setDownloadFile:(NSString *)filename Path:(NSString *)dirpath Url:(NSString *)url;

- (void)startDownload;

- (void)stopDownload;

@end
